package domain;

public class CicloTurnos implements Runnable {

	private Integer tiempo;
	private Pista pista;
	private Print printer;
	
	public CicloTurnos (int tiempo, Pista pista){
		this.tiempo = tiempo;
		this.pista = pista;
		this.printer = new Print(pista.getTablero());
	}
	public void run() {
		try {
			pista.repararAutos();
			printer.mostrarEnPantalla();
			System.out.println("----------------");
			System.out.println("----------------");
			Thread.sleep(tiempo);
			
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}

}
